package com.atguigu.gulimall.thirdpart.controller;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.thirdpart.config.SSMConponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sms")
public class SmsSendMsgController {
    @Autowired
    private SSMConponent ssmConponent;
    @GetMapping("/sendMsg")
    public R sendMsg(String phone,String code) throws Exception {

        ssmConponent.sendMsg(phone,code);

        return R.ok();
    }
}
